package com.tuanbiao.utils;

import java.util.Collection;
import java.util.Map;

/**
 * @author abiao
 * @since 2022/4/14 9:59
 */
public final class LibCollections {
    public static boolean isEmpty(Collection<?> collection) {
        return null == collection || collection.isEmpty();
    }

    public static boolean isEmpty(Map<?, ?> map) {
        return null == map || map.isEmpty();
    }

    public static int size(Collection<?> collection) {
        return null == collection ? 0 : collection.size();
    }

    public static int size(Map<?, ?> map) {
        return null == map ? 0 : map.size();
    }
}
